﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using YunLuPos.DB;
using YunLuPos.DB.Service;
using YunLuPos.Entity;
using YunLuPos.Net;
using YunLuPos.Net.Http;
using YunLuPos.Worker;

namespace YunLuPos
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void baseButton1_Click(object sender, EventArgs e)
        {
            GoodsService gs = new GoodsService();
            Goods g = gs.getGoodsByCode("10001");
            if(g == null)
            {
                Console.WriteLine("============");
            }
            Console.WriteLine(g+"3333333");
            Goods g2 = new Goods();
            g2.goodsName = "32432423";
            g2.goodsCode = "1";
            g2.barCode = "1";
            if (gs.insertOrUpdate(g2) == 0)
            {
                Console.WriteLine(g + "插入错误");
            };

            CodesService ggg = new CodesService();
            string str = ggg.genNowOrderCode(StaticInfoHoder.commInfo.shopCode,StaticInfoHoder.commInfo.posCode);
            Console.WriteLine(str);
        }

        private void baseButton2_Click(object sender, EventArgs e)
        {
            TestDB test = new TestDB();
            test.testSugarconn();
        }

        private void baseButton3_Click(object sender, EventArgs e)
        {
           
        }

        public void callServer()
        {
           
        }

        private void baseButton4_Click(object sender, EventArgs e)
        {
           
        }

        private void baseButton5_Click(object sender, EventArgs e)
        {
           
        }

        private void baseButton6_Click(object sender, EventArgs e)
        {
 
        }
    }
}
